{include file="public/layout" /}
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 
<span class="c-gray en">&gt;</span> 短信管理
<span class="c-gray en">&gt;</span> 添加短信
<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i>
</a>
</nav>
<article class="page-container" style="margin-top: 50px;">
	<form action="{:U('Admin/sms/saveHandle')}" method="post" class="form form-horizontal">
		<input type="hidden" name="data[tpl_id]" value="{$info.tpl_id ? $info.tpl_id : ''}">
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>短信签名：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" name="data[sms_sign]" id="sms_sign" style="width: 30%;" value="{$info.sms_sign ? $info.sms_sign : ''}">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>短信模板ID：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" id="sms_tpl_code" name="data[sms_tpl_code]" style="width: 30%;" value="{$info.sms_tpl_code ? $info.sms_tpl_code : ''}">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>发送场景：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<select name="data[send_scene]" id="send_scene" class="input-text" style="width: 30%;" onchange="getScene(this);">
				 {if isset($sceneList)}
				     <option value="0">请选择场景</option>
					 {foreach name="$sceneList" item="vo" key="k" }
					 <option value="{$k}" data-con="{$vo[1]}" {if isset($info['send_scene']) && $info['send_scene'] == $k}selected="selected"{/if}>{$vo[0]}</option>
					 {/foreach}
				 {/if}
				</select>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>短信内容：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<textarea rows="6" cols="80" id="content" name="data[content]">{$info.content ? $info.content : ''}</textarea>
			</div>
		</div>
		<div class="row cl">
			<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
				<button type="submit" class="btn btn-primary radius" id="save" name="save"><i class="icon-ok"></i> 确定</button>
				<button type="button" class="btn btn-success radius" id="save" name="save" onclick="javascript:history.go(-1);"><i class="icon-ok"></i> 返回上一页</button>
			</div>
		</div>
	</form>
</article>
{include file="public/footer" /}
<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="/public/h-ui.admin/lib/jquery.validation/1.14.0/jquery.validate.js"></script>
<script type="text/javascript" src="/public/h-ui.admin/lib/jquery.validation/1.14.0/validate-methods.js"></script>
<script type="text/javascript" src="/public/h-ui.admin/lib/jquery.validation/1.14.0/messages_zh.js"></script>
<!--/请在上方写此页面业务相关的脚本-->
<script type="text/javascript">
function getScene(obj) {
  	var tpl_con = $(obj).find("option:selected").attr("data-con");
  	$("#content").val(tpl_con);
}
</script>
</body>
</html>